function checkTheElement(el) {
    let rect = el.getBoundingClientRect()
    return (
        rect.top >= 0 && 
        rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)
    )
}
const item = document.querySelectorAll('.time-line li')
function setTheElement() {
    for (let i = 0; i < item.length; i++) {
        if (checkTheElement(item[i])) {
            item[i].classList.add("in-view")
        }
    }
}
window.addEventListener('load', setTheElement);
window.addEventListener('scroll',setTheElement)

